package com.fengdi.pojo;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class PageBean<T> {
    private long total;
    private List<T> list;

    private PageBean(){};

    @Bean
    public PageBean<T> pageBeanFactory() {
        return new PageBean<T>();
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageBean{" +
        "total=" + total +
        ", list=" + list +
        '}';
    }
}
